#pragma once
#include "ScenePrecompiled.hxx"
#include "SceneAnimationLayer.hxx"

namespace Eifersucht
{
	class SceneAnimationLayer::ChannelCache
	{
	public:

		typedef Reign::Vector2 KeyValuePair; TinyTypeDecl(KeyValuePair);
		typedef std::vector<KeyValuePair> KeyValuePairCollection; TinyTypeDecl(KeyValuePairCollection);

		REIGN_HINTINLINING void SetAt( _In_ uint32 index, _In_ KeyValuePair cache ) { m_vnTimeline[index] = cache; }
		REIGN_HINTINLINING KeyValuePair GetAt( _In_ uint32 index ) { return m_vnTimeline[index]; }
		REIGN_HINTINLINING void Push( _In_ KeyValuePair cache ) { m_vnTimeline.push_back(cache); }
		REIGN_HINTINLINING KeyValuePairCollectionPtr Raw() { return &m_vnTimeline; }
		REIGN_HINTINLINING uint32 Size() { return _To_uint m_vnTimeline.size(); }

		REIGN_HINTINLINING KeyValuePairPtr GetAllFrom( _In_ uint32 index ) { return &m_vnTimeline[index]; }
		REIGN_HINTINLINING KeyValuePairPtr GetAll() { return m_vnTimeline.data(); }

		ChannelCache();
		~ChannelCache();

	private:

		KeyValuePairCollection m_vnTimeline;
	};
};